package com.aspose.cells;

import java.util.ArrayList;

class zbqt extends zbz {
   zbqt(zbqs var1) {
      this.c(199);
      boolean var2 = zakq.f(var1.a);
      this.a((short)(17 + (var2 ? var1.a.length() : var1.a.length() * 2)));
      this.c = new byte[this.d()];
      int var3 = var1.b;
      if (var1.u() && !var1.i()) {
         var3 |= 128;
      }

      if (var1.j() && var1.o() && this.a(var1.c)) {
         var3 &= 64511;
      }

      byte var4 = 0;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var3), 0, this.c, var4, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.h), 0, this.c, 2, 2);
      if (var1.m()) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)var1.w()), 0, this.c, var4 + 4, 2);
      } else if (var1.n()) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)var1.i), 0, this.c, var4 + 4, 2);
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)0), 0, this.c, var4 + 4, 2);
      }

      int var5 = var4 + 6;
      if (var1.m()) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.a().f()), 0, this.c, var5, 2);
      } else if (var1.n() && var1.j.d != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.j.d.size()), 0, this.c, var5, 2);
      } else if (var1.c == null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((int)30), 0, this.c, var5, 2);
      } else if (var1.c != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var1.c.size()), 0, this.c, var5, 2);
      }

      if (var1.n() && var1.j.d != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)var1.j.d.size()), 0, this.c, var5 + 2, 2);
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)0), 0, this.c, var5 + 2, 2);
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a((short)0), 0, this.c, var5 + 4, 2);
      if (!var1.m() && var1.c != null) {
         if (var1.n()) {
            if (var1.m == 0) {
               System.arraycopy(com.aspose.cells.b.a.zc.a(var1.c.size()), 0, this.c, var5 + 6, 2);
            } else {
               System.arraycopy(com.aspose.cells.b.a.zc.a(var1.m), 0, this.c, var5 + 6, 2);
            }
         } else {
            System.arraycopy(com.aspose.cells.b.a.zc.a(var1.c.size()), 0, this.c, var5 + 6, 2);
         }
      } else {
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)0), 0, this.c, var5 + 6, 2);
      }

      var5 += 8;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.a.length()), 0, this.c, var5, 2);
      var5 += 2;
      int var10000 = var5 + zco.a(this.c, var5, var1.a);
   }

   private boolean a(ArrayList var1) {
      if (var1 != null && var1.size() != 0) {
         int var2 = var1.size();

         for(int var3 = 0; var3 < var2; ++var3) {
            if (!(var1.get(var3) instanceof DateTime)) {
               return false;
            }
         }

         return true;
      } else {
         return false;
      }
   }
}
